package com.piece.file.support;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.web.multipart.MultipartFile;
import java.io.Serializable;

@Data
@NoArgsConstructor
@ApiModel(value = "大文件数据项")
public class ChunkInfo implements Serializable {

    @ApiModelProperty(value = "上传文件主键")
    private String id;

    @ApiModelProperty(value = "当前文件块")
    private Integer chunkNumber;

    @ApiModelProperty(value = "每块大小")
    private Long chunkSize;

    @ApiModelProperty(value = "当前分块大小")
    private Long currentChunkSize;

    @ApiModelProperty(value = "总大小")
    private Long totalSize;

    @ApiModelProperty(value = "文件标识")
    private String identifier;

    @ApiModelProperty(value = "文件唯一标识")
    private String uniqueIdentifier;

    @ApiModelProperty(value = "文件名")
    private String filename;

    @ApiModelProperty(value = "文件名")
    private String name;

    @ApiModelProperty(value = "服务器路径")
    private String relativePath;

    @ApiModelProperty(value = "总块数")
    private Integer totalChunks;

    @ApiModelProperty(value = "文件类型")
    private String type;

    @ApiModelProperty(value = "块内容")
    private transient MultipartFile file;
}
